﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ODP.Com;
using ODP.Enum;

namespace ODP.Com
{
    public class Current
    {
        private static OAuthBase m_OAuth;
        public static OAuthBase OAuth
        {
            get {
                if (m_OAuth != null)
                {
                    return m_OAuth;
                }
                else if(HttpContext.Current != null && HttpContext.Current.Session["oauth"] != null)
                {
                    m_OAuth = HttpContext.Current.Session["oauth"] as OAuthBase;

                    return m_OAuth;
                }
                else if (!string.IsNullOrEmpty(HttpContext.Current.Request.QueryString["oauth_token"]))
                {
                    
                }

                return m_OAuth;
            }
            set { m_OAuth = value;}
        }


        private static TwitterType m_tType;
        public static TwitterType tType
        {
            get { return m_tType; }
            set { m_tType = value; }
        }

        private static bool m_isLogon = false;

        public static bool IsLogon
        {
            get { return Current.m_isLogon; }
            set { Current.m_isLogon = value; }
        }

        private static int m_appKeyIndex = 3;

        public static int AppKeyIndex
        {
            get { 
                return m_appKeyIndex; }
            set { m_appKeyIndex = value; }
        }

        private static System.Windows.Forms.Form m_MainForm;

        public static System.Windows.Forms.Form MainForm
        {
            get { return Current.m_MainForm; }
            set { Current.m_MainForm = value; }
        }
    }
}